package com.homedo.async.mysql.support.property;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

/**
 * @author jgshun
 */
@Data
@ConfigurationProperties(prefix = "async.mysql")
@Configuration
public class AsyncMysqlProperty {

    private boolean debug;
    private boolean printSqlInfo;

    private String appName = "ASYNC-APP";
    private String version = "UNKNOWN";
    private int connectTimeout = 3000;//连接时间 毫秒
    private int idleTimeout = 60;//空闲超时 秒
    private int reconnectInterval = 500;//设置重新连接时间间隔 毫秒
    private int reconnectAttempts = 1;//设置重新连接次数
    private String charset = "utf8";
    private String host;
    private int port;
    private String database;
    private String user;
    private String password;
    private boolean cachePreparedStatements = true;
    private int preparedStatementCacheMaxSize = 512;
    private int preparedStatementCacheSqlLimit = 2048;

    private int poolMaxSize;
    private int poolMaxWaitQueueSize;

}
